let notRequirements = [
    "window", "0", "document", "String", "Number", "Boolean", "Null", "undefined", "Symbol", "BigInt", "Object",
    "top", "location", "Math", "JSON", "Array", "Object", "Date", "RegExp", "Function", "Error", "console",
    "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError",
    "Promise", "Map", "Set", "WeakMap", "WeakSet", "Proxy", "Reflect", "Generator", "NaN", "Infinity"
]
hooks = {
    window: {}
}
windowProperties = Object.getOwnPropertyNames(window)
for (name of windowProperties) {
    if (notRequirements.includes(name)) continue;
    let property = Object.getOwnPropertyDescriptor(window, name);
    if (property.get !== "undefined" || property.set !== "undefined") {
        hooks.window[name + "_getter"] = property.get;
        hooks.window[name + "_setter"] = property.set;
        Object.defineProperty(window, name, {
            get: property.get !== "undefined" ? function () {
                const result = hooks.window[name + "_getter"].apply(this, arguments);
                console.log(`${name} get result ${result}`)
                return result;
            } : undefined,
            set: function (value) {
                const result = hooks.window[name + "_setter"].apply(this, arguments);
                console.log(`${name} set result ${result}`);
                return result;
            }
        })
    } else {
        if (typeof property.value == "function") {
            // msf.value = function () {}
        } else if (typeof property.value == "object") {
            // msf.value = null
        }
    }
}